package xyz.lne.researchgroupmanage.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import xyz.lne.researchgroupmanage.service.dataTransferObject.KeyWordDTO;

/**
 * <p>
 * 
 * </p>
 *
 * @author team7
 * @since 2021-01-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Keyword对象", description="")
public class Keyword implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "特点id")
    @TableId(value = "keyword_id", type = IdType.AUTO)
    private Integer keywordId;

    @ApiModelProperty(value = "特点名")
    private String word;


    public Keyword(Integer keywordId, String keyword) {
        this.keywordId=keywordId;
        this.word=keyword;
    }

    public KeyWordDTO convertToDTO(){
        return new KeyWordDTO(this.getKeywordId(),this.getWord());
    }
}
